*******************************************************************************
*                                                                             *
* Why Dominant Governing Parties Are Cross-Nationally Influential             *
*                                                                             *
* Tobias Böhmelt, Lawrence Ezrow, Petra Schleiter, Roni Lehrer, and Hugh Ward *
*                                                                             *
* This Version: July 12, 2017                                                 *
*                                                                             *
* Address Correspondence to: tbohmelt@essex.ac.uk                             *
*                                                                             *
*******************************************************************************

**************
* Data Setup *
**************

clear
set matsize 8000
set more off

use "Final Data ISQ.dta", clear

***********
* Table 1 *
***********

spatwmat using  "foreign_incumb_v_share76051.dta", name(W)
splagvar rile_lag_term, wname(W) wfrom(Stata)
rename wy_rile_lag_term wy_foreign_incumb_v_share

global Y rile
global X lag_rile lag_cmedian lag_econ_glob interaction party_fe1-party_fe18 party_fe20-party_fe215 year_fe1-year_fe33

reg $Y wy_foreign_incumb_v_share $X 
reg $Y wy_domestic wy_foreign_incumb_v_share $X 
reg $Y wy_domestic wy_domestic_fam wy_foreign_incumb_v_share $X 

************
* Figure 1 *
************

use "Figure 1.dta", clear

twoway (scatter vertical b, msymbol(smcircle)) (rcap lb ub vertical, lpattern(dash) horizontal msize(zero)), ytitle(, size(medsmall) color(white)) xline(0, lpattern(dash) lcolor(red)) ylabel(0(1)3, valuelabel nogrid) xtitle(Spatial Effects) xtitle(, size(medsmall)) legend(off) scheme(lean1) aspectratio(1)
